package com.zmn.plat.persistence.interfaces.orderconfig.documentarycontent;

import com.zmn.plat.model.entity.orderconfig.documentarycontent.DocumentaryContent;
import com.zmn.plat.model.entity.orderconfig.documentarycontent.DocumentaryContentQuery;
import com.zmn.plat.model.entity.orderconfig.documentarycontent.DocumentaryDepartmentRelations;
import com.zmn.plat.model.entity.orderconfig.documentarycontent.DocumentaryDepartmentRelationsQuery;
import com.zmn.plat.model.vo.orderconfig.documentarycontent.DocumentaryDepartmentRelationsVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author linfeng
 * @version v1.0
 * @类说明：跟单内容-关联跟单部门DAO
 * @since 2019/10/22 15:00
 */
public interface DocumentaryDepartmentRelationsDAO {

    /**
     * 搜索
     *
     * @param query 条件
     * @return
     */
    List<DocumentaryDepartmentRelationsVO> listByQuery(DocumentaryDepartmentRelationsQuery query);

    /**
     * 添加跟单内容
     *
     * @param documentaryDepartmentRelations 对象
     * @return
     */
    Integer insert(DocumentaryDepartmentRelations documentaryDepartmentRelations);

    /**
     * 批量插入跟单内容
     * @param departmentRelationsList
     * @return
     */
    Integer insertBatch(@Param("departmentRelationsList")List<DocumentaryDepartmentRelations> departmentRelationsList);

    /**
     * 根据跟单内容id删除跟单部门数据
     * @param documentaryContentId
     * @return
     */
    Integer deleteByDocumentaryContentId(Integer documentaryContentId);

    /**
     * 获取所有跟单部门数据
     * @return
     */
    List<DocumentaryDepartmentRelationsVO> listAll();

}
